﻿<%@ page language="java" import="java.util.*,com.netjava.pojo.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<link rel="stylesheet" type="text/css" href="${contextPath }/jsp/css/css.css"/>
<jsp:include page="/jsp/include/logo.jsp"></jsp:include>
<c:choose>
	<c:when test="${logined}">
		<jsp:include page="/jsp/include/loginedHead.jsp"></jsp:include>
	</c:when>
	<c:otherwise>
		<jsp:include page="/jsp/include/header.jsp"></jsp:include>
	</c:otherwise>
</c:choose>
<script type="text/javascript" src="jsp/js/showProduct.js">

</script>
<script type="text/javascript">
window.onload = function(){
   
   timer = window.setInterval(onTimer, nextelapse); 
 
  flag=window.setInterval(updateRecord,5000);

}
function switchProImg(source){
	
	var mainImg=document.getElementById('mainImg');
	
	mainImg.innerHTML='<img src='+source+' />';
}
</script>

<body>

<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td><strong><img src="${contextPath }/jsp/images/bg_1.gif" width="960" height="69" border="0" usemap="#Map" /></strong></td>
	</tr>
	<tr>
		<td height="10"></td>
	</tr>
</table>
<map name="Map">
	<area shape="rect" coords="811,11,939,58" href="${contextPath }/jsp/help.jsp#saleReturn">
	<area shape="rect" coords="653,12,781,59" href="${contextPath }/jsp/help.jsp#delivery">
	<area shape="rect" coords="493,12,621,59" href="${contextPath }/jsp/help.jsp#auction" target="_self">
	<area shape="rect" coords="334,12,462,59" href="${contextPath }/jsp/index.jsp#moreAuction">
	<area shape="rect" coords="177,12,305,59" href="${contextPath }/jsp/buyGoldBid.jsp">
	<area shape="rect" coords="20,11,148,58" href="${contextPath }/jsp/regist.jsp">
</map>




<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
    <td height="500" align="left" valign="top">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="30" align="left" valign="middle" background="${contextPath }/jsp/images/spxx.jpg">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="93%">&nbsp;
										</td>
										<td width="7%" valign="bottom">
											<a onClick="notice(${product.productId });">
											<script type="text/javascript" src="${contextPath }/jsp/js/notice.js"></script>
												<font size="-2">关注此商品</font>
											</a>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td height="487" valign="top" background="${contextPath }/jsp/images/bg_31.gif">
								<div style="background: transparent none repeat scroll 0% 0%; width: 960px; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" id="ProductDataPaniel_Info">
			                          <table width="906" cellspacing="0" cellpadding="0" border="0" align="center">
				                         <tbody>
				                           <tr>
					                         <td valign="top" align="left">
					                              <table width="100%" cellspacing="0" cellpadding="0" border="0">
						                             <tbody>
						                                 <tr>
							                               <td height="38" valign="middle" align="left" style="font-size: 14px; font-weight: bolder;">${product.productName}</td>
						                                 </tr>
					                                 </tbody>
					                              </table>
						                          <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
							                         <tbody>
							                             <tr> 
							                                 
								                             <td width="313" valign="top" align="center">
								                                
								                                   <table width="313" cellspacing="0" cellpadding="0" border="0" align="center">
									                                  <tbody>
									                                     <tr>
										                                   <td align="center">
										                                    <img height="12" width="313" src="${contextPath }/jsp/images/p1.gif"/>
										                                   </td>
									                                     </tr>
									                                     <tr>
										                                   <td height="335" valign="top" background="${contextPath }/jsp/images/p2.gif" align="center">
										                                     <table cellpadding="0" border="0" align="center" width="304" height="107">
											                                   <tbody>
											                                     <tr>
												                                    <td align="center" id="PDI_Paniel0_PicturePaniel_Palette_Info">
													                                   <div id="mainImg">
													                                    <img class="PDI_Paniel0_PicturePaniel_Palette_Image" src="${contextPath }/jsp/proimages/${product.image1}" alt="" title=""/>
												                                   	   </div>
												                                    </td>
											                                     </tr>
											                                    
											                                      <tr>
										                                             <td><img height="12" width="313" src="${contextPath }/jsp/images/p6.gif"/></td>
									                                                </tr>
											                                     <tr>
												                                  <td align="center">
													                               <table width="289" cellspacing="0" cellpadding="0" border="0">
														                             <tbody>
														                              <tr>	
															                            <td align="center">
																                          <img height="59" width="67" style="cursor: pointer;" onClick="switchProImg(this.src);" title="" alt="" src="${contextPath }/jsp/proimages/${product.image1}"/>
															                            </td>													
															                            <td align="center">
																                          <img height="59" width="66" style="cursor: pointer;" onClick="switchProImg(this.src);" title="" alt="" src="${contextPath }/jsp/proimages/${product.image2}"/>
															                            </td>
															                            <td align="center">
																                           <img height="59" width="66" style="cursor: pointer;" onClick="switchProImg(this.src);" title="" alt="" src="${contextPath }/jsp/proimages/${product.image3}"/>
															                            </td>
															                            <td align="center">
																                           <img height="59" width="66" style="cursor: pointer;" onClick="switchProImg(this.src);" title="" alt="" src="${contextPath }/jsp/proimages/${product.image1}"/>
															                            </td>																												
														                              </tr>
													                                 </tbody>
													                                </table>
												                                   </td>
											                                      </tr>
									                                              <tr>
										                                            <td><img height="12" width="313" src="${contextPath }/jsp/images/p3.gif"/></td>
									                                              </tr>
								                                                </tbody>
								                                               </table>
								                                              </td>
								                                               <td >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
								                                               <td valign="top" align="center">
								                                                <table width="287" cellspacing="0" cellpadding="0" border="0">
									                                             <tbody>
									                                              <tr>
										                                            <td><img height="12" width="287" src="${contextPath }/jsp/images/p4.gif"/></td>
									                                              </tr>
									                                              <tr>
										                                            <td valign="top" background="${contextPath }/jsp/images/p5.gif" align="center">
										                                              <table width="100%" cellspacing="0" cellpadding="0" border="0">
											                                            <tbody>
											                                              <tr>
												                                           <td height="335" valign="top" background="${contextPath }/jsp/images/p7.gif" align="center" style="background-repeat: no-repeat;">
												                                             <table width="90%" cellspacing="0" cellpadding="0" border="0">
													                                          <tbody>
													                                           <tr>
														                                         <td height="40"> </td>
													                                           </tr>
													                                           <tr>
														                                         <td valign="top" align="center">
														                                          <table cellspacing="0" cellpadding="0" border="0">
															                                       <tbody>
															                                          <tr><input type="hidden" id="pro" value="${auctioningProduct.auctioningId }"/>
																                                         <td align="center">
																                                           <div id="Price_Info"><span id="clock">${auctioningProduct.remainTime}</span></div>
																                                         </td>
														                                              </tr>
															                                      </tbody>
														                                         </table>
														                                        </td>
													                                           </tr>
													                                           <tr>
																                                <td align="center"><h2>当前价：￥${product.currentPrice}</h2></td>
															                                   </tr>
																										
															                                   <tr>
																                                <td valign="top" align="center">
																	                              <div style="color: rgb(120, 120, 120); margin-top: 10px;" id="Datetime_Info_#">
																	                                  <%
																	                                   Product product=(Product)request.getAttribute("product");
																	                                   int state=product.getState();
																	                                   if(state==0){
																	
																	                                   %>
																	
																		                                  <font size="2">距离商品竞拍开始时间还有1天	</font>	
																		                           <%} 
																		                         else if(state==2){
																		                        %>		<font size="2">商品已经结束拍卖	</font>		<%} %>	<font size="2">商品正在拍卖中。。。	</font>												 
																	                             </div>
																                               </td>
															                                 </tr>
															                                 <tr>
																                               <td height="35" valign="middle" align="center">
																	                             <div id="Username_Info">
																		                           <div id="Username_Info_Lable">
																			                         <font size="2">最后竞价者:</font>
																		                           </div>
																		                           <div id="Username_Info_Value">
																		                           <c:forEach var="aucRecord" items="${aucRecords}" begin="0" end="0">
																		                             <font size="2">${aucRecord.user.userName }</font>
																		                           </c:forEach>
																			
																		                           </div>
																	                              </div>
																                                 </td>
															                                   </tr>
																								
													                                           <tr>
														                                        <td valign="top" align="center" height="60"><div id="Button_Info">
														                                          <%User user=(User)request.getSession().getAttribute("loginUser");
        			                                                                                if(null!=user){ 
        			                                                                                  if(null!=user.getCard()&&user.getCard().getCardValue()>0){
        			    			
        			                                                                                    %><a href="${contextPath }/auction.do?operation=auction&productId=${product.productId}"><img src="${contextPath }/jsp/images/an_2.gif" /></a>
        			
        		                                                                                 	<%}else if(product.getState()!=1){
        		                                                                                 	
        		                                                                                 	%><img src="${contextPath }/jsp/images/an_2.gif" onClick="alert('对不起，该商品不能竞价！');"/>
        		                                                                                 	
        		                                                                                 	<%}else{%>
        			                                                                               <img src="${contextPath }/jsp/images/an_2.gif" onClick="alert('对不起你的金点数不足，请充值后再来竞拍！');"/>
        			                                                                                 <%}}
        			                                                                                 else{ 
        			                                                                                 %><img src="${contextPath }/jsp/images/an_2.gif" onClick="alert('请先登录！');"/><%} %> 
														                                        </td>
														
													                                           </tr>
													                                           <tr>
														                                         <td height="25" valign="middle" align="center" style="color: rgb(120, 120, 120);">
														                                           	<font size="-2">每次出价消耗1个有点,
															                                                     商品价格增加0.15元		</font>													
														                                         </td>
													                                            </tr>
													                                            <tr>
														                                         <td valign="top" align="center"> </td>
													                                            </tr>
													                                            <tr>
														                                         <td align="center">
														                                          <div id="Compare_Info">
														                                           <font size="-2">
															                                        <div id="MarketPrice_Info">
																                                      <div id="MarketPrice_Label_Info">市场价：</div>
																                                      <div id="MarketPrice_Value_Info">¥ 168.00</div>
															                                        </div>
															                                        <div id="SitePrice_Info">
															                                          <div id="SitePrice_Label_Info">有拍价：</div>
															                                          <div id="SitePrice_Value_Info">¥ ${product.currentPrice}</div>
															                                        </div>
															                                        <div id="Frugal_Info">
															                                           <div id="Frugal_Label_Info">可节省：</div>
															                                           <div id="Frugal_Value_Info">¥ ${168.00-price}</div>
															                                        </div>
															                                      </font>
															                                     </div>
															                                    </td>
													                                          </tr>
												                                            </tbody>
												                                           </table>
												                                          </td>
												                                        </tr>
												                                       </tbody>
												                                      </table>
												                                     </td>
												                                    </tr>
									                                                <tr>
										                                             <td><img height="12" width="287" src="${contextPath }/jsp/images/p6.gif"/></td>
									                                                </tr>
								                                                   </tbody>
								                                                  </table>
								                                                 </td>
								                                                  <td >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
								                                                  <td width="287" valign="top" align="center">
								                                                     <table width="287" cellspacing="0" cellpadding="0" border="0">
									                                                  <tbody>
									                                                   <tr>
											                                             <td height="27" valign="top" background="${contextPath }/jsp/images/p8.gif">
											                                              <table width="100%" cellspacing="0" cellpadding="0" border="0">
													                                       <tbody>
													                                        <tr>
														                                      <td width="13"> </td>
														                                      <td height="23" valign="bottom" align="left" style="color: rgb(255, 255, 255); font-weight: bolder; font-size: 14px;">出价历史记录</td>
												                                            </tr>
											</tbody></table></td>
									</tr>
										<tr>
											<td height="319" valign="top" background="${contextPath }/jsp/images/p9.gif" align="center"><table height="324" width="260" cellspacing="0" cellpadding="0" border="0">
												<tbody><tr>
													<td> </td>
												</tr>
												<tr>
													<td height="305" valign="top" align="left"><table width="100%" cellspacing="0" cellpadding="0" border="0">
														<tbody><tr>
															<td height="1" bgcolor="#e46f0e"/>
														</tr>
													</tbody></table>
														<div id="CBLog_Info">
															<!-- 标题头 -->
															
															<!-- 空数据容器 -->
															<!-- 标签 -->
															<font size="-2">
															<div id="CBLog_Lable_Info">
																<div id="CBLog_Lable_0_Info">价格(￥)</div>
																<div id="CBLog_Lable_1_Info">出价者</div>
																<div id="CBLog_Lable_2_Info">时间</div>
															</div>
															<!-- 日志数据 -->
															<div id="CBLog_Data">
															<table width="287" height="50" id="record" cellspacing="0" cellpadding="0">
															
															 <c:forEach var="aucRecord" items="${aucRecords}">
                                                                     <tr>
                                                                        <td>${aucRecord.aucPrice}</td>
                                                                        <td>${aucRecord.user.userName}</td>
                                                                        <td>${aucRecord.aucTime}</td>
															          </tr>
                                                              </c:forEach>
															   
															     
															</table>
															
															</div>
															</font>
												  </div></td>
												</tr>
												
										  </tbody></table></td>
										</tr>
										<tr>
											<td><img height="8" width="287" src="${contextPath }/jsp/images/p10.gif"/></td>
										</tr>
								</tbody></table></td>
							</tr>
						</tbody></table>
						<table width="100%" cellspacing="0" cellpadding="0" border="0">
							<tbody><tr>
								<td height="12"/>
							</tr>
						</tbody></table>
						<table width="906" cellspacing="0" cellpadding="0" border="0">
							<tbody><tr>
								<td height="27" valign="top" background="${contextPath }/jsp/images/p11.gif"><table width="100%" cellspacing="0" cellpadding="0" border="0">
									<tbody><tr>
										<td width="13"> </td>
										<td height="22" valign="bottom" align="left" style="font-weight: bolder; font-size: 14px;">拍品介绍</td>
									</tr>
								</tbody></table></td>
							</tr>
							<tr>
								<td valign="top" background="${contextPath }/jsp/images/p12.gif" align="center"><table width="96%" cellspacing="0" cellpadding="0" border="0">
										<tbody><tr>
											<td> </td>
										</tr>
										<tr>
											<td height="100" valign="top" align="left">
											<table width="100%" cellspacing="1" cellpadding="0" border="0" style="padding-left: 20px; font-size: 12px;">
                                                  <tbody>
                                                           <tr>
                                                              <td>${product.details }</td>
                                                           </tr>
										<tr>
											<td> </td>
										</tr>
								</tbody>
								</table>
								</td>
							</tr>
							<tr>
								<td><img height="30" width="906" src="${contextPath }/jsp/images/p13.gif"/></td>
							</tr>
						</tbody></table>
						<table width="100%" cellspacing="0" cellpadding="0" border="0">
							<tbody><tr>
								<td height="12"/>
							</tr>
						</tbody></table>
						<table width="906" cellspacing="0" cellpadding="0" border="0">
							<tbody><tr>
								<td height="27" valign="top" background="${contextPath }/jsp/images/p11.gif"><table width="100%" cellspacing="0" cellpadding="0" border="0">
										<tbody><tr>
											<td width="13"> </td>
											<td height="22" valign="bottom" align="left" style="font-weight: bolder; font-size: 14px;">支付方法</td>
										</tr>
								</tbody></table></td>
							</tr>
							<tr>
								<td valign="top" background="${contextPath }/jsp/images/p12.gif" align="center"><table width="96%" cellspacing="0" cellpadding="0" border="0">
										<tbody><tr>
											<td> </td>
										</tr>
										<tr>
											<td valign="top" align="left"><table width="100%" cellspacing="1" cellpadding="0" border="0">
												<tbody><tr>
													<td height="30" width="25%" bgcolor="#eeeeee" align="center"><font size="-2">支付信息</font></td>
													<td width="25%" bgcolor="#eeeeee" align="center"><font size="-2">邮寄费用</font></td>
													<td width="25%" bgcolor="#eeeeee" align="center">
														<font size="-2">退货期限</font>
													</td>
													<td width="25%" bgcolor="#eeeeee" align="center"><font size="-2">其他问题</font></td>
												</tr>
												<tr>
													<td height="22" valign="bottom" align="center"><font size="-2">通过“支付宝”支付</font></td>
													<td valign="bottom" align="center"><font size="-2">￥10</font>
													</td>
													<td valign="bottom" align="center"><font size="-2">14 天</font>
													</td>
													<td valign="bottom" align="center"><a href="Contact.asp"><font size="-2">联系我们</font></a></td>
												</tr>
											</tbody></table></td>
										</tr>
										<tr>
											<td> </td>
										</tr>
								</tbody></table></td>
							</tr>
							<tr>
								<td><img height="10" width="906" src="${contextPath }/jsp/images/p13.gif"/></td>
							</tr>
						</tbody></table>
						<table width="100%" cellspacing="0" cellpadding="0" border="0">
							<tbody><tr>
								<td height="12"/>
							<br></tr>
						</tbody></table></td>
				</tr>
			</tbody></table>
			<div id="PDI_4_Info">
				<div id="ProductData_LastBidDateTime_Info"/>
			</div>
		</div>
							</td>
						</tr>
						<tr>
							<td><img src="${contextPath }/jsp/images/bg_30.gif" width="960" height="12" />
							</td>
						</tr>
					</table>
    
</table>
</body>
<jsp:include page="/jsp/include/footer.jsp"></jsp:include>